@echo off
echo =====================================================
echo BoomShake 分销员管理 API 测试
echo =====================================================
echo.

set BASE_URL=http://localhost:8080/api

echo 1. 测试获取分销员树形结构
echo ---------------------------
curl -X GET "%BASE_URL%/admin/distributor/tree" -H "Content-Type: application/json"
echo.
echo.

echo 2. 测试获取分销员树形结构（筛选门店1）
echo ----------------------------------
curl -X GET "%BASE_URL%/admin/distributor/tree?storeId=1" -H "Content-Type: application/json"
echo.
echo.

echo 3. 测试获取分销员树形结构（筛选一级分销员）
echo ----------------------------------------
curl -X GET "%BASE_URL%/admin/distributor/tree?level=1" -H "Content-Type: application/json"
echo.
echo.

echo 4. 测试获取分销员树形结构（筛选活跃分销员）
echo ----------------------------------------
curl -X GET "%BASE_URL%/admin/distributor/tree?status=1" -H "Content-Type: application/json"
echo.
echo.

echo 5. 测试获取分销员详情（分销员ID=1）
echo ----------------------------------
curl -X GET "%BASE_URL%/admin/distributor/1" -H "Content-Type: application/json"
echo.
echo.

echo 6. 测试获取分销员佣金明细（分销员ID=1）
echo ------------------------------------
curl -X GET "%BASE_URL%/admin/distributor/1/commission-details?page=1&size=5" -H "Content-Type: application/json"
echo.
echo.

echo 7. 测试获取分销员统计信息
echo -------------------------
curl -X GET "%BASE_URL%/admin/distributor/statistics" -H "Content-Type: application/json"
echo.
echo.

echo 8. 测试获取分销员统计信息（筛选门店1）
echo ----------------------------------
curl -X GET "%BASE_URL%/admin/distributor/statistics?storeId=1" -H "Content-Type: application/json"
echo.
echo.

echo 9. 测试更新分销员状态（分销员ID=1，停用）
echo ------------------------------------
curl -X PATCH "%BASE_URL%/admin/distributor/1/status" -H "Content-Type: application/json" -d "{\"status\": 0}"
echo.
echo.

echo 10. 测试更新分销员状态（分销员ID=1，启用）
echo -------------------------------------
curl -X PATCH "%BASE_URL%/admin/distributor/1/status" -H "Content-Type: application/json" -d "{\"status\": 1}"
echo.
echo.

echo =====================================================
echo 测试完成！
echo =====================================================
pause 